import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'
// import '@/styles/element/index.scss'
//svg引入
import 'virtual:svg-icons-register'
//@ts-expect-error 解决爆红呗
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import pinia from './store'
import App from './App.vue'
import router from '@/router/index'
// 引入鉴权文件
import '../permission'
const app = createApp(App)
// console.log(import.meta.env)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 使用pinia
app.use(pinia)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})
app.mount('#app')
